import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'

/** Element-ui*/
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Element)

//style
import './assets/icons' // 图标
import '@/assets/style/index.less' // global css

/** echarts */
import * as echarts from 'echarts';

import './permission' //路由守卫

/** 自定义指令*/
import directive from '@/directive'
Vue.use(directive)

/** 全局组件挂载 */
import '@/components'

/** plugins */
import plugins from './plugins'
Vue.use(plugins)

Vue.config.productionTip = false

/**全局方法挂载 */
import { api } from '@/api'
import http from "@/utils/http";
import utils from "@/utils/utils";
import moment from 'moment'

Vue.prototype.$A = api
Vue.prototype.$H = http
Vue.prototype.$U = utils
Vue.prototype.$M = moment
Vue.prototype.$echarts = echarts;

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})
